package com.mall.server.controller.oms;

import com.mall.model.domain.OmsCompanyAddress;
import com.mall.model.vo.CommonResult;
import com.mall.server.service.oms.OmsCompanyAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author : xyiaao
 * @createDate : 2022/4/2 20:54
 */
@CrossOrigin
@RestController
@RequestMapping("/companyAddress")
public class OmsCompanyAddressController {

    @Autowired
    private OmsCompanyAddressService omsCompanyAddressService;


    /**
     * 获取所有商家收货地址
     *
     * @return
     */
    @GetMapping("/list")
    public CommonResult list() {

        List<OmsCompanyAddress> list = omsCompanyAddressService.list();
        return CommonResult.success(list);
    }

}
